﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1 {

    class SumUtils
    {
        public int Num1 { get; set; }
        public int Num2 { get; set; }

        public double D1 { get; set; }
        public double D2 { get; set; }
        
        public string S1 { get; set; }
        public string S2 { get; set; }

        public int N1 { get; set; }
     

        public SumUtils(int num1, int num2) {
            this.Num1 = num1;
            this.Num2 = num2;

        }

        public void Intron (){
            Console.WriteLine("两数相加的结果是："+ (this.Num1+this.Num2));
        }

        public SumUtils(double d1,double d2) {
            this.D1 = d1;
            this.D2 = d2;
        }

        public void point( ) {
            Console.WriteLine("两个小数相加和是："+(this.D1+this.D2));
        }

        public SumUtils(string s1,string s2) {
            this.S1 = s1;
            this.S2 = s2;
        }


        public void text() {

            Console.WriteLine("字符串相加 你是什么 "+(this.S1+this.S2));
        }



        public SumUtils(int n1)
        {
            this.N1 = n1;
        }

        public void number() {
            int sum = 0;
            for (int i = 1; i <=N1; i++)
            {
                sum = sum + i;
            }
            Console.WriteLine("从1到"+N1+"相加和是："+sum);
        }

    }
}
